<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>热门单品列表效果</title>
    <link rel="stylesheet" href="./reset.css">
    <style>
        .bigbox{
            width: 400px;
            border-radius: 10px;
            border: 1px solid rgb(247, 240, 240);
            background-color: white;
            margin: 80px auto;
        }
        .title{
            font-size: 18px;
            font-weight: 700;
            margin-left: 10px;
        }
        .list .item{
            width: 96%;
            background-color: white; 
            display: flex;
            justify-content: space-around;
            border: 1px solid white;
            border-radius: 10px;
            align-items: center;
            margin: 10px auto;
            padding: 0 10px;
        }
        .list .item .left img{
            width: 80px;
            border-radius: 10px;
        }
        .list .item .left .wenzi{
            color: white;
            font-size: 12px;
            background-color: rgb(134, 120, 120);
            margin-top: -20px;
        }
        .list .item .middle{
            margin-left: 5px;
        }
        .list .item .middle .name{
            font-size: 16px;
            font-weight: 700;
        }
        .list .item .middle .msg{
            color: red;
            font-size: 14px;
        }
        .list .item .middle .price{
            color: red;
            font-size: 16px;
        }
        .list .item .middle .shop{
            color: gray;
            font-size: 12px;
        }
        .list .item .right button{
            color: white;
            width: 70px;
            height: 30px;
            background-color: rgb(255, 42, 0);
            font-size: 14px;
            border-radius: 20px;
        }
    </style>
</head>
<body>
    <div id ="app">
        <div class="bigbox">
            <div class="title">热门单品</div>
            <div class="list">
                <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                    <div class="left">     
                        <img v-bind:src="item.pic" alt="">
                        <div class="wenzi">{{ item.wenzi }}</div>
                    </div>
                    <div class="middle">
                        <div class="name">{{ item.name }}</div>
                        <div class="msg">{{ item.msg }}</div>
                        <div class="price">{{ item.price }}</div>
                        <div class="shop">{{ item.shop }}</div>
                    </div>
                    <div class="right">
                        <button>{{ item.status }}</button>
                    </div>
                </div>
            </div>  
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
var v = new Vue({
    el:'#app',
    data:{
        tasklist:[
            {id:'1',wenzi:'价值￥9.9',pic:'../作业练习/pictures/橙子.webp',name:'脐橙3斤 快递到家',msg:'兑换后入手价8.9元',price:'￥10',shop:'适用门店 >',status:'立即兑'},
            {id:'2',wenzi:'价值￥12.9',pic:'../作业练习/pictures/粑粑柑.jpeg',name:'粑粑柑2斤 快递到家',msg:'兑换后入手价9.9元',price:'￥30',shop:'适用门店 >',status:'立即兑'},
            {id:'3',wenzi:'价值￥12.9',pic:'../作业练习/pictures/水果捞.jpeg',name:'水果捞350g',msg:'兑换后入手价6.9元',price:'￥60',shop:'适用门店 >',status:'立即兑'},
        ]
    },
    computed: {} , //computed 定义计算属性
    watch: {} , //watch 定义数据监听
    methods: {} , //methods 定义方法(函数)
    filters: {} , //filters 定义过滤器
    directives: {} , //directives 定义自定义指令
    components: {} , //components 注册局部组件
})
</script>